<template>
  <tfoot>
    <tr>
      <td>合计:</td>
      <td colspan="5">{{ isTotal }}</td>
    </tr>
  </tfoot>
</template>

<script>
export default {
  props: {
    goodList: {
      type: Array,
      required: true,
    },
  },
  data() {
    return {}
  },
  computed: {
    isTotal() {
      return this.goodList.reduce((sum, item) => {
        return sum + item.price * item.num
      }, 0)
    },
  },
}
</script>

<style></style>
